package WrittenTest;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        // 快递费用问题
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextFloat();
        String b = scanner.next();
        int price;
        if (n <= 1) {
            if (b.equals("y")) {
                System.out.println(25);
            } else {
                System.out.println(20);
            }
        }
        // 大于1kg时的费用
        else {
            if (b.equals("y")) {
                price = (int) (20 + Math.ceil(n - 1) + 5);
                System.out.println(price);
            } else {
                price = (int) (20 + Math.ceil(n - 1));
                System.out.println(price);
            }
        }
    }
}
